<#import "common/header.ftl" as head>
<#import "common/sidebar.ftl" as side>
<#import "common/footer.ftl" as foot>
<@head.page />
	
<div id="content">
	
	<#list articles as art>
	<div class="post">
		<div class="commentcount"><a href="/article/${art.createdTime?string("yyyy/MM/dd")}/${art.alias}/#comment-form" title="Comment on ${art.title}">${art.comments?size}</a></div>
		<div class="title">
			<h2><a href="/article/${art.createdTime?string("yyyy/MM/dd")}/${art.alias}/" rel="bookmark" title="Permanent Link to ${art.title}">${art.title}</a></h2>
			<div class="meta">Posted ${art.createdTime?string("yyyy-MM-dd HH:mm:ss")}. 
							  Category: <a href="/category/${art.category}/1/">${art.category} </a> 
			</div>
			<span>Tags: <#list art.getTags() as tag> </span>
				  <img src="/images/tag.gif"/><a href="/tags/${tag}/1/">${tag}</a>
			<span></#list></span>
		</div>
		<div class="entry">
			<#if (art.content?length >400) >
				<span>${art.content?substring(0, 400)}...</span>
				<#else>
				<span>${art.content}</span>
			</#if>
			<p> <a href="/article/${art.createdTime?string("yyyy/MM/dd")}/${art.alias}/" class="more-link">
				<p>Read the rest of this entry &raquo;</p>
			<p></a></p>
		</div>
	</div>
	</#list>
	
	
	<span>
	<#if artSize==0>
	<div class="page" > 
		<h2 align="center">No items found.</h2> 
	</div>
	</span>
	<#else >
	<div class="page">
		<div class="wp-pagenavi">
			<span class="pages">Page ${page} of ${(artSize/10)?ceiling }</span>
			<#list 1..(artSize/10)?ceiling as i>
			<span>
				<#if i==page>
					<span class="current">${page}</span>
				<#else>
					<a href="/${type}/${key}/${i}/" class="page" >${i}</a>
				</#if>
			</span>	
			</#list>
		</div>
	</div>	
	</#if>
</div>

<@side.page />
<span></span>
<@foot.page />
